<include file="Public:header" />
<load href="__PUBLIC__/Js/UserJs.js" />
<load href="__PUBLIC__/Js/jquery-1.7.2.min.js" />
<script language='javascript'>

</script>
<div class="ncenter_box">
<div class="accounttitle"><h1>积分充值申请 </h1></div>
    <!--<div class="c_p5"><div class="tips">汇款信息：{$s17}</div></div>-->
  <table width="100%" border="0" cellpadding="3" cellspacing="0">

      <!--
    <form name="form1" method="post" action="__URL__/currencyRechargeAC" onSubmit="{return CheckForm();}">
    <tr>
	  <td height="30" align="right">购买数量：</td>
	  <td width="40%"><input name="ePoints" type="text" id="ePoints" maxlength="9" class="ipt" onkeyup="javascript:Null_Int(this.name)"/></td>
	  <td width="40%"><div id="ePoints1" class="info"><div id="0" class="focus_r"><div class="msg_tip">请输入你要购买的数量。</div></div></div></td>
    </tr>
    <tr>
	  <td height="30" align="right">购买类型：</td>
	  <td>
      <select name="stype">
      <option value="0">充值奖金积分</option>
      <option value="1">充值注册币</option>
      </select></td>
	  <td></td>
    </tr>
    <tr style="display:none">
      <td height="30" align="right">已汇款数额：</td>
	  <td ><input name="_money" type="text" id="_money" class="ipt" onkeyup="javascript:Null_Int(this.name)" onfocus="notice('1','')"  onblur="notice('1','none')" />
      </td><td><div id="_money1" class="info"><div id="1" class="focus_r" style="display:none;"><div class="msg_tip">请输入你汇款数额。</div></div></div></td>
    </tr>
    <tr style="display:none">
      <td height="30" align="right">已汇款到账号：</td>
	  <td ><input name="_num" type="text" class="ipt" id="_num" value="{$str6}" size="30" readonly="readonly"/></td>
      <td></td>
    </tr>
    <tr>
      <td width="20%" height="30" align="right">汇款时间：</td>
	  <td colspan="2" width="80%">
      	  <input name="_year" size="5" type="text" id="_year" value={$nowdate['0']}  /> 年
      	  <input name="_month" size="5" type="text" id="_month" value={$nowdate['1']} /> 月
          <input name="_date" size="5" type="text" id="_date" value={$nowdate['2']}  /> 日
          <input name="_hour" size="5" type="text" id="_hour" /> 时
		  <input name="_minute" size="5" type="text" id="_minute" /> 分
		  &nbsp;<span class="hong">(请输入汇款时间)</span>
      </td>
    </tr>
    <tr>
      <td height="30">&nbsp;</td>
      <td><input type="submit" name="Submit" value="确定充值" class="bt_tj" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
	</form>
      -->
      <form target="_blank" id='form1' action="https://pay.ecpss.com/sslpayment" method="post" name="E_FORM">
          <table align="center" style="width:100%">
              <tr>
                  <td></td>
                  <td><input type="hidden" name="MerNo" value="<?=$MerNo?>"></td>
              </tr>
              <tr>
                  <td></td>
                  <td><input type="hidden" name="BillNo" id="BillNo" value="<?=$BillNo?>"></td>
              </tr>
              <tr>
                  <td align="right">充值金额</td>
                  <td width="10%"><input type="text" name="Amount" id="Amount" value="<?=$Amount?>"></td>
                  <td align="left"><input type="button" name="b1" id='sub' value="确定充值"></td>
              </tr>

              <tr>
                  <td></td>
                  <td><input type="hidden" name="ReturnURL" id='ReturnURL' value="<?=$ReturnURL?>" ></td>
              </tr>

              <tr>
                  <td></td>
                  <td><input type="hidden" name="AdviceURL" value="<?=$AdviceURL?>" ></td>
              </tr>
              <tr>
                  <td></td>
                  <td><input type="hidden" name="orderTime" value="<?=$orderTime?>"></td>
              </tr>

              <tr>
                  <td></td>
                  <td><input type="hidden" name="defaultBankNumber" value="<?=$defaultBankNumber?>"></td>
              </tr>

              <tr>
                  <td></td>
                  <td><input type="hidden" name="SignInfo" id="SignInfo" value="<?=$SignInfo?>"></td>
              </tr>
              <tr>
                  <td></td>
                  <td><input type="hidden" name="Remark" value="<?=$Remark?>"></td>
              </tr>
              <tr>
                  <td></td>
                  <td><input type="hidden" name="products" value="<?=$products?>"></td>
              </tr>
          </table>
      </form>
</table>
<br>
<table width="100%" class="tab3" border="0" cellpadding="3" cellspacing="1" id="tb1" bgcolor="#b9c8d0">
	<thead>
		<tr>
			<th><span>{$User_namex}</span></th>
			<th><span>购买数量</span></th>
			<th><span>充值类型</span></th>
			<th><span>购买时间</span></th>
            <!--<th><span>汇到账号</span></th>-->
			<th><span>充值状态</span></th>
		</tr>
	</thead>
    <volist name='list' id='vo'>
	<tr align="center">
        <td>{$vo['user_id']}</td>
        <td>{$vo['epoint']}</td>
        <td><eq name="vo.stype" value="0">充入奖金积分<else/>充入注册积分</eq></td>
        <td>{$vo.rdt|date='Y-m-d H:i:s',###}</td>
        <!--<td>{$vo['zhuanghao']}</td>-->

        <td><eq name="vo['is_pay']" value="0"><span style="color: #FF3300;">未成功</span></eq><eq name="vo['is_pay']" value="1">已确认</eq></td>
	</tr>
    </volist>
</table>
<table width="100%" class="tab3_bottom" border="0" cellpadding="0" cellspacing="1">
  <tr>
        <td align="center">{$page}</td>
    </tr>
</table>
<div class="bottom"></div>
</div>
</body>
</html>
<script type="text/javascript" src="http://www.veryhuo.com/uploads/Common/js/jQuery.md5.js"></script>
<script>
    new TableSorter("tb1");
    $(function(){
        var s13="<?php echo $s13;?>";
        var s15="<?php echo $s15;?>";

        $('#sub').click(function(){
//            $.post("__URL__/make_md5",{'BillNo':$('#BillNo').val(),'Amount':$('#Amount').val()}, function (data) {
//                alert('res:'+data);
//            });
            var md5src = s13+"&"+$('#BillNo').val()+"&"+$('#Amount').val()+"&"+$('#ReturnURL').val()+"&"+s15;		//校验源字符串
//                alert('md5src:'+md5src);
            var SignInfo = $.md5(md5src);		//MD5检验结果
//                alert('md5:'+SignInfo);
            SignInfo=SignInfo.toUpperCase();
//                alert(SignInfo);
//            $('#SignInfo').prop('value',SignInfo);
            $('#SignInfo').prop('value',SignInfo);

            if(confirm('确认要充值吗？')){
                $.post("__URL__/recharge_add",{'BillNo':$('#BillNo').val(),'Amount':$('#Amount').val()}, function (data) {
                });
                if(confirm('完成后请检查结果')) {
                    $('#form1').submit();
                    return true;
                }else{
                    return false;
                }
            }else{
                return false;
            }
        });
    });
</script>